#pragma once

#include "Types.h"
#include "RefCount.h"
#include "IWeapon.h"
#include "Projectile.h"
#include <map>
#include <irrlicht.h>
									
class CWeapon : public TRefCount<CWeapon>, public IWeapon, public CSceneObject
{
public:
	CWeapon(CSceneObject *parent);
	CWeapon(){}
	~CWeapon(void);
	virtual __inline E_GAMEOBJECT_TYPE getType(){ return E_GAMEOBJECT_TYPE::Weapon; } 

	void fire();
	void passTime(f32 delta);
	CWeapon *copy(void);
	
	static OBJSTRMAP  deserializeWeaponTypeList(char *name);
	static OBJSTRMAP  deserializeWeaponTypeList(char *buffer, long length);
	static OBJSTRMAP  deserializeWeaponTypeList(irr::io::IFileReadCallBack *file);

	//DECLARE_MEMBER(CSceneObject*, Parent)
	DECLARE_MEMBER(char *, Name)
	DECLARE_MEMBER(char *, Class)
	DECLARE_MEMBER(char *, ProjectileID)
	DECLARE_MEMBER(CProjectile *, Projectile)
	DECLARE_MEMBER(E_WEAPON_MOUNTPOINT, MountPoint)
	DECLARE_GET_FLAG_MEMBER(bool, isFiring)
private:
	 ;
};
